<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>信息工程学院在线考试系统</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
</head>
<body>
<%--<%--%>
<%--    if(request.getAttribute("errorMsg") != null){--%>

<%--%>--%>
<%--<div style="color: red"><%=request.getAttribute("errorMsg")%></div>--%>
<%--<%--%>
<%--    }--%>
<%--%>--%>
<div style="color: red">
    <c:if test="${requestScope.errorMsg != null}">${requestScope.errorMsg}</c:if>
</div>
<form method="get" action="login.do">
    用户名：<input type="text" name="name"><br>
    密码：<input type="password" name="password"><br>
    验证码：<input type="text" name="verify">
    <img id="verification" alt="验证码" src="/kaptcha.jpg" style="cursor:pointer;" title="看不清？换一张"/>
    <br>
    <input type="submit" value="登录">
    <input type="reset" value="重置">
</form>
<script type="text/javascript">
    $(function(){
        // 刷新验证码
        $("#verification").bind("click", function(){
            $(this).hide().attr('src', '/kaptcha.jpg?random=' + Math.random()).fadeIn();
        });
    });
</script>
</body>
</html>
